package com.yc.ycrpc.clien;

import com.yc.ycrpc.Peer;
import com.yc.ycrpc.codec.Decoder;
import com.yc.ycrpc.codec.Encoder;
import com.yc.ycrpc.codec.JSONDecoder;
import com.yc.ycrpc.codec.JSONEncoder;
import com.yc.ycrpc.transport.HttpTransportClient;
import com.yc.ycrpc.transport.TransportClient;
import lombok.Data;

import java.time.Period;
import java.util.Arrays;
import java.util.List;

/**
 * @author yc112
 */
@Data
public class RpcClientConfig {

    private Class<? extends TransportClient> transportClass =
           HttpTransportClient.class;

    private Class<? extends Encoder> encoderClass = JSONEncoder.class;
    private Class<? extends Decoder> decoderClass = JSONDecoder.class;
    // 路由选择策略
    private Class<? extends TransportSelector> transportSelectorClass = RandomTransportSelector.class;
    private int connectCount = 1;
    private List<Peer> servers = Arrays.asList(
            new Peer("127.0.0.1", 3000));
}
